home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1996 June
/
MACPOWER-1996-06.ISO.7z
/
MACPOWER-1996-06.ISO
/
Apple関連
/
OpenDoc J-1.0
/
3rd Party Components
/
Attachmate CyberTerm
/
_SOM_
/
som_CyberTermCyberExt.cpp
< prev
next >
Wrap
Text File
|
1995-12-18
|
4KB
|
100 lines
/*
* This file was generated by the SOM Compiler.
* Generated using:
* SOM incremental update: 2.33
*/
#ifdef DOGSAVVY
#define CyberSample_som_CyberTermCyberExt_Class_Source
#include <som_CyberTermCyberExt.xih>
#include "CyberTerm.h" // njp
/*
Overview
Brokers Cyberdog related messages for its OD part.
Implementation
The methods defined are:
somInit, GetBasePart, SetBasePart, and most
interesting....SetCyberItem().
The extension gets a pointer to the real part early one (stored in
fBasePart), and carries on a private dialog with it to implement
Cyberdog behavior.
*/
/*
Store a pointer to the real part in the extension. This should be sent
by the part when it creates the extension. It's just a pointer, the
extension doesn't ref-count it or anything. [・!・ I believe there's some
rational about the real part and the extension always going away at the
same time or something which needs to be verified.] [mention that this
method is part of the private part<->extension dialog, and so could be
called anything-- it's not part of the public API.]
*/
SOM_Scope void SOMLINK som_CyberTermCyberExt__SetBasePart(CyberSample_som_CyberTermCyberExt *somSelf, Environment *ev,
somToken basePart)
{
CyberSample_som_CyberTermCyberExtData *somThis = CyberSample_som_CyberTermCyberExtGetData(somSelf);
CyberSample_som_CyberTermCyberExtMethodDebug("CyberSample_som_CyberTermCyberExt","som_CyberTermCyberExt__SetBasePart");
somThis->fBasePart = basePart; // njp
}
/*
Return the extensions current base part pointer. See SetBasePart(). [is
this message ever sent? I kinda don't think so.]
*/
SOM_Scope somToken SOMLINK som_CyberTermCyberExt__GetBasePart(CyberSample_som_CyberTermCyberExt *somSelf, Environment *ev)
{
CyberSample_som_CyberTermCyberExtData *somThis = CyberSample_som_CyberTermCyberExtGetData(somSelf);
CyberSample_som_CyberTermCyberExtMethodDebug("CyberSample_som_CyberTermCyberExt","som_CyberTermCyberExt__GetBasePart");
return somThis->fBasePart; // njp
}
SOM_Scope void SOMLINK som_CyberTermCyberExt__somInit(CyberSample_som_CyberTermCyberExt *somSelf)
{
CyberSample_som_CyberTermCyberExtData *somThis = CyberSample_som_CyberTermCyberExtGetData(somSelf);
CyberSample_som_CyberTermCyberExtMethodDebug("CyberSample_som_CyberTermCyberExt","som_CyberTermCyberExt__somInit");
CyberSample_som_CyberTermCyberExt_parent_CyberPartExtension_somInit(somSelf);
somThis->fBasePart = kODNULL; // njp (not strictly necessary since SOM zeros I think)
}
/*
This is a simple, low-level message in the CyberPartExtension API. It
simply registers a pointer to the initiating CyberItem during the
CyberItem opening process. It happens to be a convenient cut-point for
a CPE subclass to override so as to receive notification of the
CyberItem opening and so initiate reactions in the real part. In the
puppy example, this message passes through to a message with the same
name and parameters in the real part where the actual handling code is.
*/
SOM_Scope void SOMLINK som_CyberTermCyberExt__SetCyberItem(CyberSample_som_CyberTermCyberExt *somSelf, Environment *ev,
CyberItem* item,
ParameterSet* openParams)
{
CyberSample_som_CyberTermCyberExtData *somThis = CyberSample_som_CyberTermCyberExtGetData(somSelf);
CyberSample_som_CyberTermCyberExtMethodDebug("CyberSample_som_CyberTermCyberExt","som_CyberTermCyberExt__SetCyberItem");
// DebugStr("¥pExtension::SetCyberItem!!!!!!!!!!!!!");
// The inherited call does maintain a _fCyberItem instance variable for us.
// We then pass the message through to our real part. njp
CyberSample_som_CyberTermCyberExt_parent_CyberPartExtension_SetCyberItem(somSelf,ev,item,openParams);
CyberTerm* realPart = (CyberTerm*) somThis->fBasePart;
if (realPart) {
realPart->SetCyberItem(ev, item, openParams);
}
}
#endif